package pers.cz.postgirl.adapter.http.apache.httpclient;

import pers.cz.postgirl.adapter.AbstractTransformer;
import pers.cz.postgirl.config.EvenType;
import pers.cz.postgirl.core.EnhanceModel;

/**
 * @program: postgirl-client
 * @description: apache下httpclient*.jar增强
 * @author: Cheng Zhi
 * @create: 2024-05-02 17:55
 **/
public class HttpClientPlugin extends AbstractTransformer {

    @Override
    public void loadEnhanceModel() {
        EnhanceModel.MethodPattern.builder()
                .methodName("execute")
                .paramTypes(new String[]{"org.apache.http.HttpHost", "org.apache.http.HttpRequest", "org.apache.http.protocol.HttpContext"})
                .evenTypes(new EvenType[] {EvenType.BEFORE, EvenType.RETURN})
                .build();
    }
}
